Skip to content

Conversation

@adrian-prantl
Copy link
Contributor

@adrian-prantl adrian-prantl commented Sep 19, 2025

For clients, such as the debugger, who do not have access the full
output of the dependency scanner, it is a huger performance and
correctness improvement if each explicitly built Swift module not just
serialized all its Clang .pcm dependencies (via the serialized Clang
compiler invocation) but also its direct Swift module dependencies.

This patch changes the Swift module format to store the absolute path
(or casid) for each dependency in the INPUT block, and makes sure
the deserialization makes these available to the ESML.

rdar://150969755

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming the DWARF + reference to the self module is in a later PR.

@adrian-prantl adrian-prantl force-pushed the 159531233 branch 2 times, most recently from 0a414e5 to 56bdb55 Compare October 15, 2025 00:09
@adrian-prantl adrian-prantl changed the title [WIP] Serialize module dependencies in swift module files Serialize module dependencies in swift module files Oct 17, 2025
@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test source compatibility

@adrian-prantl
Copy link
Contributor Author

(Added an escape hatch flag)

@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test source compatibility

@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test source compatibility

For clients, such as the debugger, who do not have access the full
output of the dependency scanner, it is a huger performance and
correctness improvement if each explicitly built Swift module not just
serialized all its Clang .pcm dependencies (via the serialized Clang
compiler invocation) but also its direct Swift module dependencies.

This patch changes the Swift module format to store the absolute path
or cas cache key for each dependency in the INPUT block, and makes
sure the deserialization makes these available to the ESML.

rdar://150969755
@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test macOS

@adrian-prantl
Copy link
Contributor Author

@swift-ci test windows

@adrian-prantl
Copy link
Contributor Author

Iphone simulator failures seem to fail on all recent PRs on the bot.

@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

@adrian-prantl adrian-prantl merged commit a352978 into swiftlang:main Oct 22, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants